package com.springstack.kafka.consumer.config;

import lombok.Data;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author qiangfanghao
 * @date 2022/7/24
 * kafka 自定义消费者属性
 */
@Data
@Component
@ConfigurationProperties(prefix = "spring.kafka.consumer")
public class KafkaConsumerProperties {

    private String bootstrapServers;
    /** k v  kafka的序列化器 比java的要轻 */
    private Class<StringDeserializer> keyDeserializer = StringDeserializer.class;
    private Class<StringDeserializer> valueDeserializer = StringDeserializer.class;
    private String groupId;
    private String enableAutoCommit;
    private String autoCommitIntervalMs;
    private String autoOffsetReset;
    private String heartbeatIntervalMs;
    private String sessionTimeoutMs;
    private String maxPollRecords;


}
